package com.songlanyun.modules.offlinegoods.model.dto;

import com.songlanyun.common.drive.ValueObject;
import com.songlanyun.common.validator.group.AddGroup;
import com.songlanyun.common.validator.group.UpdateGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 服务商品
 *
 * @author lijiahe
 * @date 2023-02-11
 */
@Data
public class OfflineGoodsTypeDTO implements ValueObject {
    private static final long serialVersionUID = 1L;

    /**
     * 服务商品id
     */
    @NotNull(message = "主键id不能为空", groups = {UpdateGroup.class})
    private Long id;
    /**
     * 商家id
     */
    private Long shopId;
    /**
     * 分类名称
     */
    @NotBlank(message = "分类名称不能为空", groups = {AddGroup.class, UpdateGroup.class})
    @Length(max = 50, message = "分类名称最大字数不能超过50字", groups = {AddGroup.class, UpdateGroup.class})
    private String name;

    /**
     * 创建者
     */
    private Long createBy;
}
